package com.enjoyor.soa.traffic.rest.efoms.dubbo.invoke;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.service.dubbo.idcs.DubboIDCSBayonetService;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

@Component
public class DubboBayonetServiceInvoke {

	@Reference(timeout = 10000)
    private DubboIDCSBayonetService dubboIDCSBayonetService ;

    /**
     * 获取卡口状态信息
     * @return
     */
    public ResultPojo getBayonetStatusInfo() {
    	ResultPojo pojo = new ResultPojo();
    	if (null != dubboIDCSBayonetService) {
    		String token = null;//"712ecc99-c541-4113-a4a4-07f7abf2a371";
    		String systemKey = null;// "f5c3deec-584c-49a3-a672-6ecd47b7ea2a";
    		String regionId = "360402";
    		pojo = dubboIDCSBayonetService.getBayonetStatusList(systemKey, token, regionId, null, null);
    	}
        return pojo;
    }
    
    /**
     * 根据设备编号获取卡口状态信息
     * @return
     */
    public ResultPojo getBayonetStatusInfoById(String devId) {
    	ResultPojo pojo = new ResultPojo();
    	if (null != dubboIDCSBayonetService) {
    		pojo = dubboIDCSBayonetService.getBayonetStatusListByDev(null, null, devId, null, null);
    	}
        return pojo;
    }
}
